Komodo 3.0 Review

There are several different types of programmers, but I would wager that the vast majority are just like me: their mouse is a crucial input extension, and having an environment that supports the task at hand makes coding easier and, dare I say, more fun. This is where a GUI IDE (Integrated Development Environment) can help, with syntax highlighting, project management, code completion, reference documentation, support tools, and being able to use your mouse to place your cursor or to select a particular segment of code.

I’m a GUI IDE kind of guy, and I’ve been through quite a few of them to find the one that best suits me as a Perl Web Developer. ActiveState’s Komodo (version 3.0.1) fits the bill, though there remains room for improvement. Let’s start with the positive, and then I’ll address where Komodo can improve. * Editor’s Note (2018): Komodo is up to version 11 and many things have changed.*

Pluses

The last time that Perl.com reviewed Komodo was October 2002. At that time, Komodo was at version 2.0, which was slow and whose functionality seemed only halfway implemented. It showed promise then and has made huge leaps in subsequent versions to overcome the major failings, with speed increases, functionality improvements, and adding even more features.

My first criteria for any editor is (accurate) syntax highlighting. All editors have this to some extent, but when you throw some wacky Perl stuff their way (heredocs, for example), they start to choke and mislead you. Komodo has handled everything I’ve thrown at it flawlessly and has a neat preferences panel where you can customize the color scheme with your own flair (or some might say lack thereof when they see my screen).

Another important feature for an IDE is project management, a way to group a list of files relevant to the project you’re working on in an easy-to-access fashion. Komodo has a Projects tab, through which you can do pretty much anything in that regard; it even includes a powerful Import from File System that’ll help you set up a project in no time. Also, within that same tab is a Code Explorer, which will parse and index the open file for subroutines

Simon referred to Komodo’s Toolbox in the previous review, and that’s certainly been a great feature for me. I’ve setup some tools, such as PerlTidy, to run on an open file. Then, when I open a messy file, I can just double-click on that tool, and it’ll clean up the file. I also have other tools to insert standard snippets of HTML and HTML::Template code. Snippets are really cool because you can set the cursor placement after you’ve inserted the snippet, as well as maintain the indentation styles. You can also assign Key Bindings to pretty much anything, including the tools. When I hit Ctrl-1, the editor will insert this:

<!-- TMPL_VAR NAME="" -->

into my code and put the cursor right there in the NAME parameter, so I can keep typing. I’ve included some instructions after the review below to show you how to set these up.

Simon also referred to the Rx Toolkit, which is still available and great to use to play around with regular expressions and figure out how they will work. Version 3.0 brings vast improvements to the Rx Toolkit, with different modes for Match, Match All (for multiline text to match against), Split, and Replace/Replace All. This tool is indispensable for those who are tinkering with a regular expression and trying to figure things out. ActiveState went a step further and added a Perl Interactive Shell that allows you to type or paste in lines of code and play around. This has been useful for me when figuring out data structures and how to access deeply-nested data.

Komodo also supports CVS [and Perforce (version control)], such that within the IDE, you can perform versioning functionality (diff, commit, checkout, etc). It will also monitor the files and repository so that if there are any changes, the files’ indicator will change accordingly, keeping you aware of what’s going on. You can also setup the CVS remotely over SSH to interact with a remote repository securely.

I feel like I’ve barely scratched the surface with what Komodo can do, both in this review as well as my personal experience with the IDE. Komodo has a powerful debugger, which in an IDE setting is a great way to visualize your code executing, with the line of code in one window and a tab with call stacks, output, watched variables (that you can change midstream if you like), breakpoints, and more. Komodo presents complex watched variables in a nested tree format, allowing you to expand elements of hashes and arrays to go through the data. Komodo also supports remote debugging, allowing you to debug a remote console script or web application right inside Komodo, stepping in and out of code and watching variables right off the remote server. Personally, I could never make this work (despite ActiveState Technical Support’s best efforts), but I haven’t had the need for it in the first place.

Komodo also supports different languages besides Perl, such as HTML, PHP, Python, and XML (including syntax highlighting support for 30 other languages). I do dabble in PHP from time to time, so Komodo gives me a one-stop IDE to handle that, too. I can also incorporate all of these file types into one project for easy access.

Just as the power of Perl comes from its community, ActiveState also extends a sense of community with Komodo, with ASPN, a portal of sorts that encompasses mailing lists, documentation, cookbooks (code recipes), and a bugzilla. With an ActivePerl Pro Studio subscription, ASPN also integrates with Safari, such that you can search and read over 1,000 technical books from O’Reilly, Addison Wesley, and other publishers.

Komodo installs a ton of helpful documentation and tutorials locally. You can easily pull up the documentation for a specific function/module by highlighting it and hitting Shift-F1 (which does a Google search on perldoc.com for the highlighted string) or Ctrl-F1 (which does a Google search on any site for the highlighted string). Komodo also comes with some sample tools in the Toolbox (that you could bind to another key combination) to run perldoc locally on the highlighted function or module.

ActiveState is also working on a new point release that will bring AutoComplete and CallTips to the Perl language, which will provide even more efficiency to coding and reference documentation. This next release will also address a few bugs (some of which I address below) and reinforces their dedication to responding to our feedback and pushing for even more functionality.

Minuses

Komodo 3.0 has a few hiccups and flaws, though. It seems the winds of version control have shifted to something called Subversion. The IDE doesn’t directly support it, though you could certainly create supporting tools in the Toolbox. As I said earlier, I also had problems with Remote Debugging, though it was never a high-enough priority for me to figure out what was going on. Komodo also allows you to access files through FTP, but not SCP/SSH, which is more secure and becoming the standard for accessing remote files.

Also, when Komodo went from 2.5.2 to 3.0, they moved the Toolbox from a tab in the Projects Tab to a tab of its own, which kind of annoys me because it eats into my precious screen real estate. It would be nice to be able to customize the placements of the various tabs and what they contain. Komodo also doesn’t support code descriptions in the Code Browser for Perl (they do for PHP and Python), though that may change, hopefully with the next release.

Lastly, there seem to be quite a few minor GUI flaws. There’s nothing major to prevent you from doing your work; the flaws are things like double-clicking on a subroutine name in the Code Browser goes to the line, but in a huge Perl file, it doesn’t center on the screen (you may have to scroll a bit) and more seldom, doesn’t go to the right line (the start of the subroutine). I also had a problem with copy and pasting stuff in a line-wrapped code that would then appear as if I have lost code. Reflowing the paragraphs sometimes doesn’t work (it would reflow more narrowly than it should have). When I ran the PerlTidy tool on my open file, I wouldn’t see the “File Changed on Disk” alert until I Alt-Tabbed to another application and then Alt-Tabbed back.

Conclusion

The great thing about ActiveState is that their developers and technical support use their mailing lists and a Bugzilla to interact with the feedback and to track down these types of flaws and address them.

At the risk of sounding like a fanboy, ActiveState’s Komodo is an amazing platform, surrounding you with the power to accomplish any Perl task at hand. Despite its negative points, they aren’t enough to overcome the benefits it brings to the table, and I highly recommend it for Perl programmers of any variety. Komodo is available for Windows, Linux, and Solaris. Prices start at $29.95 for the personal edition (non-commercial/educational use) and $295 for the professional edition. Subscriptions, upgrade pricing, and a free 21-day fully-functional edition are also available off of their web site.

Toolbox Setup Instructions

To setup PerlTidy:

  1. Make sure you have Perl and PerlTidy installed. For Windows, grab the ActivePerl distribution from ActiveState and then download and install the PerlTidy script from SourceForge.
  2. In your toolbox tab, click the Add Item button at the top; then select New Command.
  3. The cursor starts off in the Command line, which you can specify as:

    perl c:\path\to\perltidy -b [perltidy style prefs] %f
    

    *(-b specifies to tidy the file in place, making a .bak backup file.)*

  4. In the advanced section, put %D in the Start field to launch PerlTidy in the script’s working directory.

  5. Rename the Command to PerlTidy in the field at the top.

  6. At this point, you can also go to the Key Binding tab and assign a key combination to run the command.

  7. Save, open a Perl file and give it a shot, either using the key combination you assigned or by double clicking on the command from your Toolbox.

To setup a snippet, such as the HTML::Template tag:

  1. In your toolbox tab, click the Add Item button at the top, and then select New Snippet.
  2. Type in the text to insert when you run the snippet. In my case, I used:

    <!-- TMPL_VAR NAME="" ESCAPE=HTML -->
    
  3. Be sure to place the cursor between the quote marks and select the Maintain selected text or cursor position after insertion checkbox.

  4. Name the snippet (I used tmplvar) at the top. You can also go to the Key Binding tab at the top and assign a key combination to run the snippet.

  5. Save and then give it a shot, either using the key combination you assigned or by double clicking on the command from your Toolbox.

Tags

Feedback

Something wrong with this article? Help us out by opening an issue or pull request on GitHub